<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<title>预览户外广告设置证</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<style type="text/css">
			.titleCss{
				font-size:300%;
				text-align:center;
				font-weight: bold;
			}
			.justifyCss{
				width:20%;
				text-align:justify;
				text-justify:distribute-all-lines;
				text-align-last:justify;
			}
			.tdCss{
				font-size:200%;
				font-weight: bold;
			}
			.inputNoborder {
			    FONT-SIZE: 30px;
			    FONT-FAMILY: 宋体;
			    BORDER-RIGHT: #FFFFFF 1px solid;
			    BORDER-TOP: #FFFFFF 1px solid;
			    BORDER-LEFT: #FFFFFF 1px solid;
			    BORDER-BOTTOM: #FFFFFF 1px solid;
			}
		</style>
		<script src="${ctx}/resources/js/jquery/jquery.js" type="text/javascript"></script>
		<script type="text/javascript">
			window.onload=function(){
				var activityName=document.getElementById("activityName").value;
				//只有最后一个环节"电子盖章"才可以打印,其他环节只可以保存
				if(activityName=="dzgz"){
					document.getElementById("printButton").style.display="";
					document.getElementById("saveButton").style.display="none";
				}else{
					document.getElementById("printButton").style.display="none";
					document.getElementById("saveButton").style.display="";
				}
			}
			
			function save(){
				var params = $("#hwggForm").serialize();
					var url="${ctx}/yw-hw-sh-sqb!saveGgSzz.action";
					$.ajax({
						url : url,
						type : "post",
						dataType : "html",
						data : params,
						success : function(msg) {
							if(msg=="success"){
								alert('保存成功!');
							}else{
								alert('保存失败！');
							}
						},
						error:function() {
							alert("添加失败！请刷新重试！");
						}
					});
			}
			
			function printHwgg(){
                 var url="yw-hw-sh-sqb!printnewHwgg.action?id="+${id}+"&printtype=${printtype}";
                 window.open(url);           
           }
		</script>
	</head>
	<body>
		<form name="hwggForm" id="hwggForm">
		<input type="hidden" name="id" value="${id}"/>
		<input type="hidden" id="activityName" value="${activityName}"/>
		<input type="hidden" id="printtype" value="${printtype}">
		<table width="1024" border=0 align="center">
			<tr>
				<td class="titleCss" colspan="2">户外广告设置证</td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
                <td class="justifyCss tdCss">设置证号：</td>
                <c:if test="${selectType}=='wq'"></c:if>
                <td class="inputNoborder">穗城管委${selectType}户外广设字[<%=(new java.util.Date()).getYear()+1900%>]<input name="szzh" value="${szzh}" class="inputNoborder" style="width:10%;"/>号</td>
            </tr>
			<tr>
				<td class="justifyCss tdCss">设置人名称：</td>
				<td class="tdCss"><input name="sqdw" value="${sqdw}" class="inputNoborder" style="width:100%;"/></td>
			</tr>
			<!-- 
			<tr>
				<td class="justifyCss tdCss">中标单位：</td>
				<td class="tdCss"><input name="zbdw" value="${zbdw}" class="inputNoborder" style="width:100%;"/></td>
			</tr>
			 -->
			<tr>
				<td class="justifyCss tdCss">地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址：</td>
				<s:if test="ggszd != null && ggszdlength > 18">
				    <td class="tdCss">
				        <textarea rows="2" name="ggszd" cols="" type="text" class="text" style="width:100%;font-size: 20px;">${ggszd}</textarea>
				        <!-- <input name="address" value="${address}" class="inputNoborder" style="width:100%;font-size: 20px;"/> -->
				    </td>
				</s:if>
				<s:else>
				    <td class="tdCss"><input name="ggszd" value="${ggszd}" class="inputNoborder" style="width:100%;"/></td>
				</s:else>
			</tr>
			<tr>
				<td class="justifyCss tdCss">法定代表人：</td>
                <td class="tdCss"><input name="frxm" value="${frxm}" class="inputNoborder" style="width:100%;"/></td>
			</tr> 
			<tr>
				<td class="justifyCss tdCss">设置类型：</td>
				<td class="tdCss"><input name="ggxsStr" value="${ggxsStr}" class="inputNoborder" style="width:100%;"/></td>
			</tr>
			<tr>
				<td class="justifyCss tdCss">设置规格：</td>
				<td class="tdCss"><input name="szggStr" value="${szggStr}" class="inputNoborder" size="50"/></td>
			</tr>
			<tr>
				<td class="justifyCss tdCss">设置期限：</td>
				<td class="tdCss" style="white-space: nowrap;">
				自
				<input name="startyear" value="${startyear}" class="inputNoborder" style="width:120px;"/>
                  年
                <input name="startmonth" value="${startmonth}" class="inputNoborder" style="width:45px;"/>
                  月
                <input name="startday" value="${startday}" class="inputNoborder" style="width:40px;"/>
				至
				<input name="endyear" value="${endyear}" class="inputNoborder" style="width:120px;"/>
				年
				<input name="endmonth" value="${endmonth}" class="inputNoborder" style="width:45px;"/>
				月
				<input name="endday" value="${endday}" class="inputNoborder" style="width:40px;"/>
				日</td>
			</tr>
			<tr>
				<td class="justifyCss tdCss">备 注：</td>
				<td style="FONT-SIZE: 15px;">
				    <textarea rows="2" name="bz" cols="" type="text" class="text" style="border:0;overflow-y:hidden;width:100%;font-size: 15px;height:100%">备注：1、取得《户外广告设置证》后，持该证及有关材料到工商行政管理部门申请办理《户外广告登记证》。2、设置期限届满需要继续设置的，应当于期限届满30日前向原审批机关申请延期。3、公益广告与商业广告比例为7：3，如遇创文等重大宣传活动，按主管部门要求设置。</textarea>
				</td>
			</tr>
			<tr>
				<td colspan="2"><table width="100%"><tr>
					<td width="65%"></td>
					<td style="font-size:150%;font-weight: bold;">
					发证机关：<input type="text" class="inputNoborder" name="fzjg" style="FONT-SIZE: 20px;" value="${fzjg }"/><!-- 广州市城市管理委员会 -->
					</td>
				</tr></table></td>
			</tr>
			<tr>
				<td colspan="2"><table width="100%"><tr>
					<td width="65%"></td>
					<td style="font-size:150%;font-weight: bold;white-space: nowrap;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<!--发证日期：-->
					<input name="printyear" value="${printyear }" class="inputNoborder" style="width:95px;FONT-SIZE: 20px;"/>
					年
					<input name="printmonth" value="${printmonth }" class="inputNoborder" style="width:42px;FONT-SIZE: 20px;"/>
					月
					<input name="printday" value="${printday }" class="inputNoborder" style="width:45px;FONT-SIZE: 20px;"/>
					日</td>
				</tr></table></td>
			</tr>
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<!-- 
			<tr>
				<td colspan="2" style="text-align:center;font-size:150%;font-weight: bold;">广东省住房和城乡建设厅印制</td>
			</tr>
			 -->
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
			<tr>
				<td colspan="2" style="text-align:center;">
					<input id="saveButton" type="button" value="保&nbsp;&nbsp;存" style="width:100px;" onclick="save()"/>
					<input id="printButton" type="button" value="打&nbsp;&nbsp;印" style="width:100px;" onclick="printHwgg()"/>
					<input type="button" value="关闭窗口" onclick="window.close();" style="width:100px;"/>
				</td>
			</tr>
		</table>
		</form>
		<div id="autoPrintDiv" style="display:none;"><iframe height='1000' width='700' name='autoPrintIFrame'/></div>
	</body>
</html>